package Code.StringTraverse;

import java.util.Scanner;

//敏感词替换
public class Test7 {
    public static void main(String[] args) {

        //定义敏感词库
        String[] arr = {"tmd","cnm","sb"};

        String talk = "tmd666cnm";

        for (int i = 0; i < arr.length; i++) {
            talk =  talk.replace(arr[i],"***");
        }


        System.out.println(talk);

    }
}
